package com.definesys.smecrailtransit.module.SiteDetails.Fragment;

import java.text.SimpleDateFormat;

/**
 * Created by cjy on 2017/8/29.
 */

public class DateController {
    private String nowMonth;
    private String selectMonth;
    private String selectYear;
    private String type;

    public DateController(String type){
        this.type = type;

        //获取系统时间
        SimpleDateFormat sDateFormat =  new SimpleDateFormat("yyyy-MM");
        String date = sDateFormat.format(new java.util.Date());
        this.selectMonth = date.substring(5,7);
        this.nowMonth = date.substring(5,7);
        if( !this.selectMonth.equals("10") || !this.selectMonth.equals("11") || !this.selectMonth.equals("12")){
            this.selectMonth = date.substring(6,7);
            this.nowMonth = date.substring(6,7);
        }

        this.selectYear = date.substring(0,4);


    }

    public String getNowMonth() {
        return nowMonth;
    }

    public void setNowMonth(String nowMonth) {
        this.nowMonth = nowMonth;
    }

    public String getSelectMonth() {
        return selectMonth;
    }

    public void setSlectMonth(String selectMonth) {
        this.selectMonth = selectMonth;
    }

    public String getSelectYear() {
        return selectYear;
    }

    public void setSelectYear(String selectYear) {
        this.selectYear = selectYear;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
